import {
	getRequest,
    postRequest,
    postParamsRequest,
    uploadFile,
    postRequestUrl
} from './http'

// 小程序登录
export const LOGIN = data => postParamsRequest(`/waterResourceManage/api/v1/login1`, data);

//查询用户信息
export const GET_USERINFO = data => getRequest(`/waterResourceManage/api/v1/currentUser`, data);

//查询待检查列表
export const GET_SELF_LIST = data => postRequest(`/waterResourceManage/api/v1/manage/inspectRecord/selfWaitList`, data)

//查询取用水户抽查记录列表
export const GET_CHACK_LIST = data => postRequest(`/waterResourceManage/api/v1/manage/inspectRecord/list`, data)

//查看取用水户抽查记录详情
export const GET_CHACK_DES = data => postRequestUrl(`/waterResourceManage/api/v1/manage/inspectRecord/show/`, data)

//查询抽查批次
export const GET_CHACK_PERIODS = data => getRequest(`/waterResourceManage/api/v1/manage/inspectRecord/inspectBatchList`, data)

//查询分类表树形
export const GET_CLASS_TREE = data => postRequest(`/waterResourceManage/api/v1/system/allSort/tree`, data)

//新增事项检查结果
export const ADD_INSPECT_RESULT = data => postRequest(`/waterResourceManage/api/v1/manage/inspectResult/batchAddOrUpdate?operator=2`, data)

//查询事项检查结果
export const GET_INSPECT_RESULT = data => getRequest(`/waterResourceManage/api/v1/manage/inspectResult/getOneResult`, data)

//文件上传
export const UPLOAD_FILE = (url, data) => uploadFile(`/waterResourceManage/api/v1/system/file/singleFileUpload`, url, data)

//文件删除
export const FILE_DEL = data => postParamsRequest(`/waterResourceManage/api/v1/system/file/del`, data)
